CREATE TABLE [dbo].[TRUSUA_BDAT]
(
[CO_USUA] [dbo].[TD_VC_008] NOT NULL,
[NO_BDAT] [dbo].[TD_VC_008] NOT NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TRUSUA_BD__CO_US__09746778] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TRUSUA_BD__FE_US__0A688BB1] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TRUSUA_BD__CO_US__0B5CAFEA] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TRUSUA_BD__FE_US__0C50D423] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TRUSUA_BDAT] ADD CONSTRAINT [PK__TRUSUA_B__31883A6933BFA6FF] PRIMARY KEY CLUSTERED  ([CO_USUA], [NO_BDAT]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TRUSUA_BDAT] ADD CONSTRAINT [FK__TRUSUA_BD__CO_US__4A6E022D] FOREIGN KEY ([CO_USUA]) REFERENCES [dbo].[TMUSUA] ([CO_USUA])
GO
GRANT SELECT ON  [dbo].[TRUSUA_BDAT] TO [public]
GRANT INSERT ON  [dbo].[TRUSUA_BDAT] TO [public]
GRANT DELETE ON  [dbo].[TRUSUA_BDAT] TO [public]
GRANT UPDATE ON  [dbo].[TRUSUA_BDAT] TO [public]
GO
